import service from '@/utils/request'

import LoginWork from '@/utils/LoginWork'
// 主体查询
export const mainQuery = (pamrs: any) => {
  return LoginWork.post<any, any>(`/finish/rec/history/list`, pamrs)
}

// 冲裁查询
export const Blanking = (parms: any) => {
  return LoginWork.post<any, any>(`/finish/rec/list`, parms)
}

// 收发类型
export const TransceiverType = (lotNo: string, collectType: any) => {
  return service.get<any, any>(`/finish/rec/groupno?lotNo=${lotNo}&collectType=${collectType}`)
}

// 部门查询
export const deptNameQuery = () => {
  return service.get<any, any>(`/dept/last?searchKey=${''}`)
}

// 获取装箱方式
export const GetPackingMethod = () => {
  return service.get<any, any>(`/finish/rec/packtype/combo?searchKey=${''}`)
}

// 明细删除
export const DetailDeletion = (parms: any) => {
  return LoginWork.post<any, any>(`/finish/rec/history/del?id=${parms}`, parms)
}

// 日期查询
export const dateQuery = (dateInfo: string) => {
  return service.post<any, any>(`/pcFactorStockQuery/punchInDateQuery?dateInfo=${dateInfo}`)
}

// 收发表单回显
export const TheCommandOutput = (parms: string) => {
  return service.post<any, any>(`/pcFactorStockQuery/punchRecIoBack`, parms)
}

// 冲裁回显
export const Blanking1 = (parms: any) => {
  return service.post<any, any>(`/pcFactorStockQuery/punchRecIoTempBack`, parms)
}

// 批量收料
export const BulkReceiving = (parms: any) => {
  return LoginWork.post<any, any>(`/pcFactorStockQuery/punchRecDetIo`, parms)
}

// 批次查询
export const BatchQuery = (parms: any) => {
  return service.post<any, any>(`/pcFactorStockQuery/cuttingBatchQuery`, parms)
}

// 提交出库作业
export const SubmitTheOutgoingJob = (parms: any) => {
  return LoginWork.post<any, any>(`/finish/rec/stockOut`, parms)
}

// 提交出库作业
export const SubmitTheOutgoingJob3 = (parms: any) => {
  return LoginWork.post<any, any>(`/finish/rec/stockIn`, parms)
}

// 导出
export const Export = (parms: any) => {
  return LoginWork.post<any, any>(`/stockWork/report/stockIn/invoices?date=${parms.date}&type=${parms.type}`)
}
